// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   CourseOverviewValidator.java

package com.nervytech.tutorcruise.spring.form.validator;

import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;

@Component("courseOverviewValidator")
public class CourseOverviewValidator
{

    public void validate(Object target, Errors errors)
    {
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "courseTitle", "NotEmpty.createCourseOverviewForm.courseTitle", "Course Title must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "taggedSkills", "NotEmpty.createCourseOverviewForm.taggedSkills", "Tagged Skills must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "overview", "NotEmpty.createCourseOverviewForm.overview", "Course overview must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "objective", "NotEmpty.createCourseOverviewForm.objective", "Objective must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "preRequisite", "NotEmpty.createCourseOverviewForm.preRequisite", "Pre requisite must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "audience", "NotEmpty.createCourseOverviewForm.audience", "Audience details must be provided");
    }

    public void validateAgenda(Object target, Errors errors)
    {
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "agenda", "NotEmpty.createCourseAgendaForm.agenda", "Agenda must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "trainerDetails", "NotEmpty.createCourseAgendaForm.trainerDetails", "Trainer Details must be provided");
    }
}
